package com.lhkj.ct.meta.modules.gauge.service;

import com.lhkj.ct.base.mybatis.extension.service.BatchHandleService;
import com.lhkj.ct.meta.modules.gauge.model.entity.TblScaleDimension;
import com.lhkj.ct.meta.modules.gauge.model.vo.ScaleDimensionVo;
import com.lhkj.ct.meta.modules.gauge.validation.constraints.DimenExpression;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;

import java.util.List;

/**
 * <p>
 * 量表维度 服务类
 * </p>
 *
 * @author jobob
 * @since 2023-10-16
 */
@Validated
public interface DimensionService extends BatchHandleService<TblScaleDimension> {

    /**
     * 查询量表所有维度id和名称和年龄区间
     */
    List<ScaleDimensionVo> selectAllByScale(String scaleId);

    TblScaleDimension getForm(String dimId);

    boolean checkNameUnique(TblScaleDimension dimension);

    @Transactional
    boolean save(@DimenExpression TblScaleDimension dimension);

    @Transactional
    boolean update(@DimenExpression TblScaleDimension dimension);
}
